package threading;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2023-07-04
 * Time: 22:28
 */
public class ThreadDemo24 {
    public static void main(String[] args) {
        //线程池
        ExecutorService pool = Executors.newFixedThreadPool(10);//工厂模式（解决构造方法的坑）创建对象

        pool.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println("hello pool");
            }
        });

    }
}
